<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NVTX C API Reference: nvToolsExtCudaRt.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">NVTX C API Reference<span id="projectnumber">&#160;v3</span>
   </div>
   <div id="projectbrief">NVIDIA Tools Extension Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_48b95086e7eb28d79ef283b47c5fa0c6.html">nvtx3</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">nvToolsExtCudaRt.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">* Copyright 2009-2022  NVIDIA Corporation.  All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">*</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">* Licensed under the Apache License v2.0 with LLVM Exceptions.</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">* See https://llvm.org/LICENSE.txt for license information.</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">*/</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &quot;<a class="code" href="nv_tools_ext_8h.html">nvToolsExt.h</a>&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;cuda.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;driver_types.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#ifndef NVTOOLSEXT_CUDART_V3</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#define NVTOOLSEXT_CUDART_V3</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment">/* ========================================================================= */</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="comment">/*  ------------------------------------------------------------------------- */</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="comment">/* \cond SHOW_HIDDEN </span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="comment">* \brief Used to build a non-colliding value for resource types separated class</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="comment">* \version \NVTX_VERSION_2</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="comment">*/</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#define NVTX_RESOURCE_CLASS_CUDART 5</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="comment">/*  ------------------------------------------------------------------------- */</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga0c4c8dd24343fa6f3d32cd778c5fd9ff">   44</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code hl_enumeration" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga0c4c8dd24343fa6f3d32cd778c5fd9ff">nvtxResourceCUDARTType_t</a></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>{</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    NVTX_RESOURCE_TYPE_CUDART_DEVICE = NVTX_RESOURCE_MAKE_TYPE(CUDART, 0), <span class="comment">/* int device */</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    NVTX_RESOURCE_TYPE_CUDART_STREAM = NVTX_RESOURCE_MAKE_TYPE(CUDART, 1), <span class="comment">/* cudaStream_t */</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>    NVTX_RESOURCE_TYPE_CUDART_EVENT = NVTX_RESOURCE_MAKE_TYPE(CUDART, 2), <span class="comment">/* cudaEvent_t */</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>} <a class="code hl_enumeration" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga0c4c8dd24343fa6f3d32cd778c5fd9ff">nvtxResourceCUDARTType_t</a>;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span><span class="comment">/* ------------------------------------------------------------------------- */</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga7dc62de300d3ee0ecd96c8ea4bdf9ede">   62</a></span>NVTX_DECLSPEC <span class="keywordtype">void</span> NVTX_API <a class="code hl_function" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga7dc62de300d3ee0ecd96c8ea4bdf9ede">nvtxNameCudaDeviceA</a>(<span class="keywordtype">int</span> device, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>NVTX_DECLSPEC <span class="keywordtype">void</span> NVTX_API nvtxNameCudaDeviceW(<span class="keywordtype">int</span> device, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* name);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="comment">/* ------------------------------------------------------------------------- */</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga83a1216bed0f8c995a9f8190325d502c">   76</a></span>NVTX_DECLSPEC <span class="keywordtype">void</span> NVTX_API <a class="code hl_function" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga83a1216bed0f8c995a9f8190325d502c">nvtxNameCudaStreamA</a>(cudaStream_t stream, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>NVTX_DECLSPEC <span class="keywordtype">void</span> NVTX_API nvtxNameCudaStreamW(cudaStream_t stream, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* name);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><span class="comment">/* ------------------------------------------------------------------------- */</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#gabbdb1f82b6ae42291dd9f9cfce0bda6a">   90</a></span>NVTX_DECLSPEC <span class="keywordtype">void</span> NVTX_API <a class="code hl_function" href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#gabbdb1f82b6ae42291dd9f9cfce0bda6a">nvtxNameCudaEventA</a>(cudaEvent_t event, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>NVTX_DECLSPEC <span class="keywordtype">void</span> NVTX_API nvtxNameCudaEventW(cudaEvent_t event, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* name); <span class="comment">/* END RESOURCE_NAMING */</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span><span class="comment">/* ========================================================================= */</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><span class="preprocessor">#ifdef UNICODE</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><span class="preprocessor">  #define nvtxNameCudaDevice nvtxNameCudaDeviceW</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span><span class="preprocessor">  #define nvtxNameCudaStream nvtxNameCudaStreamW</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span><span class="preprocessor">  #define nvtxNameCudaEvent  nvtxNameCudaEventW</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span><span class="preprocessor">  #define nvtxNameCudaDevice nvtxNameCudaDeviceA</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><span class="preprocessor">  #define nvtxNameCudaStream nvtxNameCudaStreamA</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span><span class="preprocessor">  #define nvtxNameCudaEvent  nvtxNameCudaEventA</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span> </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>}</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span><span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span> </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span><span class="preprocessor">#ifndef NVTX_NO_IMPL</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span><span class="preprocessor">#define NVTX_IMPL_GUARD_CUDART </span><span class="comment">/* Ensure other headers cannot included directly */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span><span class="preprocessor">#include &quot;nvtxDetail/nvtxImplCudaRt_v3.h&quot;</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span><span class="preprocessor">#undef NVTX_IMPL_GUARD_CUDART</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span><span class="preprocessor">#endif </span><span class="comment">/*NVTX_NO_IMPL*/</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span><span class="preprocessor">#endif </span><span class="comment">/* NVTOOLSEXT_CUDART_V3 */</span><span class="preprocessor"></span></div>
<div class="ttc" id="agroup___r_e_s_o_u_r_c_e___n_a_m_i_n_g_html_ga0c4c8dd24343fa6f3d32cd778c5fd9ff"><div class="ttname"><a href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga0c4c8dd24343fa6f3d32cd778c5fd9ff">nvtxResourceCUDARTType_t</a></div><div class="ttdeci">nvtxResourceCUDARTType_t</div><div class="ttdoc">Resource types for CUDART.</div><div class="ttdef"><b>Definition:</b> <a href="nv_tools_ext_cuda_rt_8h_source.html#l00044">nvToolsExtCudaRt.h:45</a></div></div>
<div class="ttc" id="agroup___r_e_s_o_u_r_c_e___n_a_m_i_n_g_html_ga7dc62de300d3ee0ecd96c8ea4bdf9ede"><div class="ttname"><a href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga7dc62de300d3ee0ecd96c8ea4bdf9ede">nvtxNameCudaDeviceA</a></div><div class="ttdeci">NVTX_DECLSPEC void NVTX_API nvtxNameCudaDeviceA(int device, const char *name)</div><div class="ttdoc">Annotates a CUDA device.</div></div>
<div class="ttc" id="agroup___r_e_s_o_u_r_c_e___n_a_m_i_n_g_html_ga83a1216bed0f8c995a9f8190325d502c"><div class="ttname"><a href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#ga83a1216bed0f8c995a9f8190325d502c">nvtxNameCudaStreamA</a></div><div class="ttdeci">NVTX_DECLSPEC void NVTX_API nvtxNameCudaStreamA(cudaStream_t stream, const char *name)</div><div class="ttdoc">Annotates a CUDA stream.</div></div>
<div class="ttc" id="agroup___r_e_s_o_u_r_c_e___n_a_m_i_n_g_html_gabbdb1f82b6ae42291dd9f9cfce0bda6a"><div class="ttname"><a href="group___r_e_s_o_u_r_c_e___n_a_m_i_n_g.html#gabbdb1f82b6ae42291dd9f9cfce0bda6a">nvtxNameCudaEventA</a></div><div class="ttdeci">NVTX_DECLSPEC void NVTX_API nvtxNameCudaEventA(cudaEvent_t event, const char *name)</div><div class="ttdoc">Annotates a CUDA event.</div></div>
<div class="ttc" id="anv_tools_ext_8h_html"><div class="ttname"><a href="nv_tools_ext_8h.html">nvToolsExt.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
